﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using ET.Score.Service.Dtos;
using System.Collections.ObjectModel;
namespace ET.Score.Service.Interfaces
{
    /// <summary>
    /// 用户以外为教研端服务的数据查询接口
    /// </summary>
    [ServiceContract]
    public interface IDatabaseService
    {
        /// <summary>
        /// 根据角色类别获取所有考核列表
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
         [OperationContract]
        ObservableCollection<TestPro> GetTestProList(int roleid = 0,int testlevel=0);
        /// <summary>
        /// 根据场景任务id获取任务信息
        /// </summary>
        /// <param name="testid"></param>
        /// <returns></returns>
         [OperationContract]
         TestOperSetDto GetTestOperSet(int testid);
        /// <summary>
        /// 获取客户端类型列表
        /// </summary>
        /// <returns></returns>
         [OperationContract]
         List<ClientTypeDto> GetClientTypeList();
        /// <summary>
        /// 根据角色名称获取场景任务列表
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
         [OperationContract]
         List<TestOperSetDto> GetScenetestList(int roleid,int testlevel=0);
        /// <summary>
        /// 获取基本场景和自定义高级场景
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
         [OperationContract]
         List<TestOperSetDto> GetAllScenetestList(int roleid,int testlevel=0);
         [OperationContract]
         List<OperItem> GetOperItemList(int roleid);
        /// <summary>
        /// 保存场景
        /// </summary>
        /// <param name="item"></param>
        [OperationContract]
      void  SaveTestOperSetDto(TestOperSetDto item);
        /// <summary>
        /// 删除场景
        /// </summary>
        /// <param name="testid"></param>
       [OperationContract]
        void DeleteTestOperSetDto(int testid);
       [OperationContract]
       int GetMaxTestid();
       [OperationContract]
       OperItemConfigInfoDto GetOperItemConfigInfoDto();
        /// <summary>
        /// 保存操作日志，用来做测试用，以后这个接口不用
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="operid"></param>
        /// <param name="opertime"></param>
        /// <param name="operdes"></param>
        [OperationContract]
       void SendOperInfo(int userid,int operid,DateTime opertime,string operdes);
         [OperationContract(Name = "GetDispatcherScoreByUserId")]
        List<DispatcherScoreDto> GetDispatcherScore(int userid, DateTime frmTime, DateTime toTime);
         [OperationContract(Name = "GetDispatcherScoreByUserName")]
         List<DispatcherScoreDto> GetDispatcherScore(string  username, DateTime frmTime, DateTime toTime);
         [OperationContract]
         void SaveUnionTask(UnionTaskDto task);
         [OperationContract]
         List<UnionTaskDto> GetUnionTaskList();
        [OperationContract]
         int GetMaxUnionTaskId();

    }
}
